<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<%@ page import="org.springframework.security.ui.AbstractProcessingFilter" %>
<%@ page import="org.springframework.security.ui.webapp.AuthenticationProcessingFilter" %>
<%@ page import="org.springframework.security.AuthenticationException" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>管理系统登录页</title>
	<link rel="shortcut icon" href="${ctx}/skin/images/frame/favicon.ico" >
	<%@ include file="/common/meta.jsp" %>
	
	<script src="${ctx}/js/jquery.js" type="text/javascript"></script>
	<script src="${ctx}/js/validate/jquery.validate.js" type="text/javascript"></script>
	<script src="${ctx}/js/validate/messages_cn.js" type="text/javascript"></script>
	<script>
		$(document).ready(function() {
			$("#loginForm").validate();
		});
		function dosubmit(){
			$("#loginForm").submit();
		}
		function doreset(){
			$("form:first")[0].reset();
		}
	</script>
	<style>
	* {
		font-size: 12px;
		font-family: "宋体";
	}
	
	td { line-height: 1.5; }
	body {   font-size: 12px;
	  line-height: 1.5;
	  font-family: "宋体";}
	
	form,h1,h2,h3,ul,ol,div{	margin: 0; padding:0;}
	td,th,div {
		word-break:break-all;
		word-wrap:break-word;
	}
	
	}
	</style>
</head>

<body bgColor='#ffffff'>
	<div  style="margin:5% auto;width:498px;color:#fff;">
		<%
			if (session.getAttribute(AbstractProcessingFilter.SPRING_SECURITY_LAST_EXCEPTION_KEY) != null) {
		%> 
		<span style="color: red"> 登录失败，请重试.</span> 
		<%
			}
		%>
		<form id="loginForm" action="${ctx}/j_spring_security_check" method="post">
		<table width="436" border="0" align="center" cellpadding="0" cellspacing="0">
		  <tr>
			<td colspan="2"><img src="${ctx}/skin/images/frame/login_03.gif" width="498" height="119" /></td>
		  </tr>
		  <tr>
			<td width="438" height="314" valign="top" background="${ctx}/skin/images/frame/login_05.gif"><table width="400" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="136" height="26">&nbsp;</td>
                <td width="264">&nbsp;</td>
              </tr>
              <tr>
                <td height="30" align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong style="font-size:14px;">用户名：</strong></td>
                <td>
                <input type='text' id='j_username' name='j_username' class="required" style="border:1px solid #fff; width:210px;"
					<s:if test="not empty param.error">
						value='<%=session.getAttribute(AuthenticationProcessingFilter.SPRING_SECURITY_LAST_USERNAME_KEY)%>'</s:if> />
                </td>
              </tr>
              <tr>
                <td height="30" align="left">&nbsp;</td>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td height="30" align="left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong style="font-size:14px;">&nbsp;密&nbsp;&nbsp;码：</strong></td>
                <td>
                <input type='password' id='j_password' name='j_password' class="required" style="border:1px solid #fff; width:210px;"/>
                </td>
              </tr>
              <tr>
                <td height="40" align="left">&nbsp;</td>
                <td><input type="checkbox" name="_spring_security_remember_me"/>
                  两周内记住我 </td>
              </tr>
              <tr>
                <td height="100" align="right">&nbsp;</td>
                <td>
                  <a href="javascript:dosubmit();"><img src="${ctx}/skin/images/frame/lg_ok.gif" width="102" height="31" border="0" /></a>&nbsp;&nbsp;
                  <a href="javascript:doreset();"><img src="${ctx}/skin/images/frame/cancel.gif" width="102" height="31" border="0" /></a>
                </td>
              </tr>
            </table></td>
		    <td width="60">&nbsp;</td>
		  </tr>
		</table>
		</form>  
	</div>
</body>
</html>

